
import axios from 'axios'

export default {
    namespaced: true,
    state: {
        productions: [],
    },
    mutations: {
        getProductions(state, payload) {
            state.productions = payload
        }
    },
    getters: {},
    actions: {
        async getProductions({ commit }) {
            const { data } = await axios({
                method: 'GET',
                url: 'http://127.0.0.1:3000/products'
            })
            commit('getProductions', data)
        }
    }
}